/*
 * IntegerLiteralAst.cpp
 *
 *  Created on: 3 Nov 2010
 *      Author: kn308
 */

#include "../MAlice.hpp"
#include "../Codegen.h"
#include "IntegerLiteralAst.h"

#include <llvm/Constants.h>

namespace MAlice
{

IntegerLiteralAst::IntegerLiteralAst(int value) :
	mValue(value)
{
}

IntegerLiteralAst::~IntegerLiteralAst()
{
}

llvm::Value* IntegerLiteralAst::generate()
{
	using namespace llvm;
	return ConstantInt::get(Type::getInt32Ty(Codegen::get()->getContext()), mValue, true);
}


}
